package com.hd.appcommon.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hd.appcommon.entity.Teacher;
import com.hd.hdxgddcommon.page.MyPage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author administrator
 * @since 2020-11-24
 */
@Repository
@Mapper
public interface TeacherMapper extends BaseMapper<Teacher> {

    @Select(" select m.* from teacher m " +
            " inner join org_member_role mr " +
            " on  CONCAT(m.id, '') = mr.org_member_id " +
            " where mr.role_id = #{roleId} ")
    List<Teacher> listByRoleId(@Param("roleId") String roleId);

    }
